package fr.epri;

import fr.epri.user.Users;
import fr.epri.util.HibernateUtil;
import org.hibernate.Session;

public class App {

    public static void main(String[] args) {
        System.out.println("Maven + Hibernate + Oracle");
        Session session = HibernateUtil.getSessionFactory().openSession();

        session.beginTransaction();
        Users user = new Users();

        //user.setUserId(1);
        user.setUsername("administrateur");
        user.setPassword("epri");

        session.save(user);
        session.getTransaction().commit();
    }
}
